Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

482
Views
Pylint no es un error iterable al subclasificar Lista [int]

Ejemplo de código:

 from typing import List class MyList(List[int]): def total(self) -> int: return sum(i for i in self) a = MyList([1,2,3]) print(f'{a.total()=:}')

Cuando lo ejecuto, funciona

 a.total()=6

Pero cuando uso pylint, aparece el siguiente error

 ... toy.py:5:30: E1133: Non-iterable value self is used in an iterating context (not-an-iterable) ...

Hay otros errores de pylint, pero son comprensibles. Para el problema not-an-iterable , no lo entiendo bien, ¿estoy subclasificando List[int] , correctamente?

Estoy usando Python-3.8, pylint==2.6.0

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Actualicé pylint a una versión más reciente.

 pylint --version pylint 2.9.6 astroid 2.6.6 Python 3.8.2 (default, Mar 15 2021, 10:18:42)

y el error se ha ido.

Debido a limitaciones del sistema, no puedo actualizar a la última versión.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!